package com.auction.mapper;

import com.auction.common.dao.MyBaseMapper;
import com.auction.entity.Product;
import com.auction.query.ProductQuery;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ProductMapper extends MyBaseMapper<Product> {

    int delete(@Param(value = "id") Integer id);
    //根据id改变产品的状态
    int byIdStatus(Product product);
    //根据id改变产品主图
    int byIdByIdPicture(Product product);
    //根据id查找商品
    Map byIdP(@Param("id") Integer id);
    //更新数据
    int updateProduct( Product product);
    //添加
    List<Map>  selectComm(ProductQuery productQuery);
}
